<%--
    @Description： 区域信息
    @Author： 樊双峰
    @Date： 2018-08-10 23:54
--%>
<style type="text/css">
th, tr, td {
    text-align: center;
}
</style>

<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${request.getContextPath()}/Area/areaInfo"
          method="post">
        <div class="bjui-searchBar">
            <g:hiddenField name="SYS_QUERY_NAME" value="getAreaInfo"/>
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;|
            <a class="btn btn-green" data-toggle="dialog"
               data-url="${request.getContextPath()}/Area/addArea"
               data-title="新增">区域新增</a>&nbsp;
        </div>
    </form>
</div>

<div class="bjui-pageContent tableContent">
    <div style="margin:0px auto; width:100%;">
        <div class="row">
            <div class="col-md-12" id="">
                <g:if test="${getAreaInfo.size() > 0}">
                    <table data-toggle="tablefixed" data-width="100%" data-nowrap="true">
                        <thead>
                        <tr>
                            <th>No.</th>
                            <th>区域名</th>
                            <th>区域描述</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <g:each in="${getAreaInfo}" status="i" var="area">
                            <tr>
                                <td>${i + 1}</td>
                                <td>${area.AREA_NAME}</td>
                                <td>${area.AREA_DESC}</td>
                                <td>
                                    <a class="btn btn-green" data-toggle="dialog"
                                       data-url="${request.getContextPath()}/Area/editArea?id=${area.ID}"
                                       data-title="编辑">编辑</a>
                                    <a class="btn btn-red" data-confirm-msg="确定要删除该行信息吗？"
                                       data-toggle="doajax" data-type="DELETE"
                                       data-callback=function(){$.CurrentNavtab.navtab('refresh')}
                                       href="${request.getContextPath()}/Area/deleteArea?id=${area.ID}">删除</a>
                                </td>
                            </tr>
                        </g:each>
                        </tbody>
                    </table>
                </g:if>
                <g:else>
                    <g:render template="../template/emptyPanel"/>
                </g:else>
            </div>
        </div>
    </div>
</div>
<g:render template="../template/pagination"/>